package com.code.demo.mvp.base;

/**
 * Created by yangliguo on 2019/3/1.
 */

public abstract class BaseMvpPresenter<T extends IView> implements IPresenter<T> {

    protected T view;

    public BaseMvpPresenter() {
        onStart();
    }

    @Override
    public void onStart() {

    }

    @Override
    public void onDestroy() {
        this.view = null;
    }

    @Override
    public void attachView(T view) {
        this.view = view;
    }

    @Override
    public T getView() {
        return view;
    }
}
